﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using KretschIT.WP_Fx.EasyMoq.Generator.Tests.Helpers.Async;
using System.Threading.Tasks;

namespace KretschIT.WP_Fx.EasyMoq.Generator.Tests
{
    [TestClass]
    public class EasyMoqAsyncTest
    {
        [TestMethod]
        public void Test_AsyncCalc()
        {
            Assert.Inconclusive("Not supported yet.");
            var mock = Easy.Moq.Mock<ITestAsyncFunc>();
            mock.Setup(m => m.Calc()).Returns(new Task<int>(() => 42));

            var result = mock.Object.Calc();

            Assert.AreEqual(42, result.Result);
        }
    }
}
